<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var f = prompt("谁帅谁请客")
        if (f > 2000 && f > 0) {
            document.write("请大家吃西餐")
        } else if (f < 2000 && f >= 1500) {
            document.write("请大家吃快餐")
        } else if (f < 1500 && f >= 1000) {
            document.write("请大家喝饮料")
        } else if (f < 1000 && f >= 500) {
            document.write("请大家吃糖")
        } else {
            document.write("我请大家一起吃糖，每一天的生活都是甜甜的")
        }
    </script>
</head>

<body>

</body>

</html>